package org.example.chapter3.controller;

import org.example.chapter3.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author CoderXshuai
 */
@RestController
public class HelloWorldController {
    @Autowired
    private User user;

    @GetMapping("/helloWorld")
    public String hello() {
        return "HelloWorld";
    }

    @GetMapping("/user")
    public User user() {
        return user;
    }
}
